<style scoped></style>

<template>
  <div>
    <input type="text" v-model="message">
    <button @click="getData()">GET DATA</button>
  </div>
</template>

<script lang="ts" setup>

import { ref } from "vue";

const message = ref("hello");

const getData = () => {
  console.log(message.value);
}

</script>

<!-- 
<script lang="ts">
export default {
  data() {
    return {
      message: "hello "
    }
  },
  methods: {
    getData() {
      console.log(this.message);
    }
  }
}
</script> 
-->